#ifdef __OPENCL_VERSION__
#ifdef USE_DOUBLE_PRECISION

#ifdef cl_khr_fp64
#pragma OPENCL EXTENSION cl_khr_fp64 : enable
#elif cl_amd_fp64
#pragma OPENCL EXTENSION cl_amd_fp64 : enable
#else
#error Not possible to enable double precision in this device!
#endif

typedef double real;
typedef double2 real2;
typedef double3 real3;
typedef double4 real4;

#else

typedef float real;
typedef float2 real2;
typedef float3 real3;
typedef float4 real4;

#endif //USE__DOUBLE_PRESITION
#else
#define CL_USE_DEPRECATED_OPENCL_1_1_APIS
#define __CL_ENABLE_EXCEPTIONS
#include <CL/cl.hpp>
#ifdef USE_DOUBLE_PRECISION
typedef double real;
typedef cl_double cl_real;
typedef cl_double2 cl_real2;
typedef cl_double3 cl_real3;
typedef cl_double4 cl_real4;
#define INFOP(message) printf("%sUSING DOUBLE PRECISION%s\n","\033[0;32m","\033[0m");
#else
typedef float real;
typedef cl_float cl_real;
typedef cl_float2 cl_real2;
typedef cl_float3 cl_real3;
typedef cl_float4 cl_real4;
#endif
#endif //__OPENCL_VERSION__
